package com.ruoyi.system.service.carPark.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.carPark.FzCarInOut;
import com.ruoyi.system.mapper.carPark.FzCarInOutMapper;
import com.ruoyi.system.service.carPark.IFzCarInOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 进场记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-03
 */
@Service
public class FzCarInOutServiceImpl implements IFzCarInOutService
{
    @Autowired
    private FzCarInOutMapper fzCarInOutMapper;

    /**
     * 查询进场记录
     * 
     * @param carInOutId 进场记录ID
     * @return 进场记录
     */
    @Override
    public FzCarInOut selectFzCarInOutById(String carInOutId)
    {
        return fzCarInOutMapper.selectFzCarInOutById(carInOutId);
    }

    /**
     * 查询进场记录列表
     * 
     * @param fzCarInOut 进场记录
     * @return 进场记录
     */
    @Override
    public List<FzCarInOut> selectFzCarInOutList(FzCarInOut fzCarInOut)
    {
        return fzCarInOutMapper.selectFzCarInOutList(fzCarInOut);
    }

    /**
     * 新增进场记录
     * 
     * @param fzCarInOut 进场记录
     * @return 结果
     */
    @Override
    public int insertFzCarInOut(FzCarInOut fzCarInOut)
    {
        fzCarInOut.setCreateTime(DateUtils.getNowDate());
        return fzCarInOutMapper.insertFzCarInOut(fzCarInOut);
    }

    /**
     * 修改进场记录
     * 
     * @param fzCarInOut 进场记录
     * @return 结果
     */
    @Override
    public int updateFzCarInOut(FzCarInOut fzCarInOut)
    {
        fzCarInOut.setUpdateTime(DateUtils.getNowDate());
        return fzCarInOutMapper.updateFzCarInOut(fzCarInOut);
    }

    /**
     * 删除进场记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzCarInOutByIds(String ids)
    {
        return fzCarInOutMapper.deleteFzCarInOutByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除进场记录信息
     * 
     * @param carInOutId 进场记录ID
     * @return 结果
     */
    @Override
    public int deleteFzCarInOutById(String carInOutId)
    {
        return fzCarInOutMapper.deleteFzCarInOutById(carInOutId);
    }
}
